<extend  name="Public:base" />
<block name="title">首页</block> 
<block name="style">
	<style>
		.table th{width: 140px;text-align:right;padding-right:20px;}
		.table td{width: auto;}  

	</style>
</block>
<block name="content"> 
	<ol class="breadcrumb">
	  <li><a href="#">起始页</a></li> 
	  <li class="active">系统管理</li>
	</ol>
	<ul id="myTabs" class="nav nav-tabs">
		<foreach name="tabs" item='val' key="k">
	  		<li role="presentation" class="{$active==$k?'active':''}"><a href="#{$k}">{$val}</a></li> 
		</foreach>
	</ul>
	<div id="tabsContens" class="tab-content">
		<!-- 基本配置 -->
		<foreach name="tabs" item='val' key="k">
			<div role="tabpanel" class="tab-pane fade {$active==$k?'active in':''}" id="{$k}" aria-labelledby="{$k}-tab"></div>
		</foreach> 
	</div>  
</block>
<block name="script">
<script>
	$(function(){
		$('#myTabs a').click(function (e) {
		  	e.preventDefault()
		  	$(this).tab('show');
		  	var type = (e.currentTarget.hash).substr(1);
		  	ajaxGetInfo(type); 
		});
		ajaxGetInfo('{$active}');d

	});
	/**
	 * ajax获取信息
	 * @return {[type]} [description]
	 */
	function ajaxGetInfo(type){
		if(type == ''){
			var type = 'web_info';
		}
		console.log(type);
		$.ajax({
	  		url:'__CONTROLLER__/ajaxConfig',
	  		type:'post',
	  		data:{'type':type},
	  		dataType:'json',
	  		success:function(res){
	  			var content = res.content;
	  			$("#"+type).html('');
	  			console.log(type);
	  			$("#"+type).html(content);
	  		}
	  	});
	}


</script>
</block>

